<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--Converted with LaTeX2HTML 96.1 (Feb 5, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->


<title>Overflow</title>
<meta name="description" content="Overflow">
<meta name="keywords" content="htmlatex">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<link rel="STYLESHEET" href="acm-00465_files/htmlatex.css">
</head><body bgcolor="#ffffff" lang="EN">
 <h1><br clear="all"><center><table bgcolor="#0060f0"><tbody><tr><td><b><font color="#c0ffff" size="5">&nbsp;<a name="SECTION0001000000000000000000">Overflow</a></font>&nbsp;</b></td></tr></tbody></table></center></h1>
<p>
Write a program that reads an expression consisting of two
non-negative integer and an operator. Determine if either integer or
the result of the expression is too large to be represented as a
``normal'' signed integer (type <tt>integer</tt> if you are working
Pascal, type <tt>int</tt> if you are working in C).
</p><p>
</p><h2><font color="#0070e8"><a name="SECTION0001001000000000000000">Input</a></font></h2>
<p>
An unspecified number of lines. Each line will contain an integer, one
of the two operators <tt>+</tt> or <tt>*</tt>, and another integer.
</p><p>
</p><h2><font color="#0070e8"><a name="SECTION0001002000000000000000">Output</a></font></h2>
<p>
For each line of input, print the input followed by 0-3 lines
containing as many of these three messages as are appropriate: ``<tt>first
number too big</tt>'', ``<tt>second number too big</tt>'', ``<tt>result too big</tt>''.
</p><p>
</p><h2><font color="#0070e8"><a name="SECTION0001003000000000000000">Sample Input</a></font></h2>
<p>
</p><pre>300 + 3
9999999999999999999999 + 11</pre>
<p>
</p><h2><font color="#0070e8"><a name="SECTION0001004000000000000000">Sample Output</a></font></h2>
<p>
</p><pre>300 + 3
9999999999999999999999 + 11
first number too big
result too big</pre>
<p>
</p></body></html>